chore(promql_utilities): relocate Statistic/KeyByLabelNames to asap_types - #397
Merged
Merged
Conversation
…ypes
Stage 3 of the promql_utilities retirement. QueryResultType moves into
data_plane::query_engines::query_result (no asap_types dependency
there); Statistic and KeyByLabelNames both move into asap_types
instead of data_plane as originally planned in the design doc — the
dependency graph is promql_utilities <- asap_types <- data_plane, and
both types are load-bearing inside asap_types itself
(compatible_agg_types, QueryRequirements, capability_matching,
AggregationConfig::grouping_labels, PolicyFingerprint,
PolicyRegistry), so moving them into data_plane (which sits above
asap_types) would create an unbuildable cycle.
No behavior change: both types move verbatim, including their
debug!() tracing calls. Every downstream import site (48 files) is
repointed to asap_types::{Statistic, KeyByLabelNames} (or crate::
where the site is itself inside the asap_types crate).
- cargo build --workspace: clean
- cargo test -p promql_utilities -p asap_types -p control_plane:
828 passed, 1 pre-existing unrelated failure
(invalid_sketch_type_override_falls_back_to_default)
- cargo check --workspace --tests: clean
- cargo test -p data_plane --lib: 881 passed
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Stage 3 of the
promql_utilitiesretirement plan (see Stage 1: ASAPController#141, Stage 2: #396).QueryResultTypemoves intodata_plane::query_engines::query_result(inlined; it had noasap_typesdependency, so this matches the original plan).StatisticandKeyByLabelNamesmove intoasap_types, notdata_planeas the original design doc said. Corrected mid-stage after checkingCargo.toml: the dependency graph ispromql_utilities ← asap_types ← data_plane, and both types are already load-bearing insideasap_typesitself (compatible_agg_types,QueryRequirements,capability_matching,AggregationConfig::grouping_labels,PolicyFingerprint,PolicyRegistry). Moving them intodata_plane(which sits aboveasap_types) would have created an unbuildable dependency cycle.asap_types::{Statistic, KeyByLabelNames}, orcrate::where the call site is itself inside theasap_typescrate.No behavior change — both types moved verbatim, including their
debug!()tracing calls.Test plan
cargo build --workspace— cleancargo test -p promql_utilities -p asap_types -p control_plane— 828 passed, 1 pre-existing unrelated failure (invalid_sketch_type_override_falls_back_to_default)cargo check --workspace --tests— clean (confirms all 48 touched import sites, including test/bench files, compile)cargo test -p data_plane --lib— 881 passed🤖 Generated with Claude Code